package com.study.storm.controller;


import com.study.storm.entity.User;
import com.study.storm.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author
 * @since 2019-03-12
 */
@RestController
@RequestMapping("/user")
public class UserController {
    @Autowired
    UserService userService;

    @GetMapping("/test")
    public String test(){
        User user = userService.selectByPrimaryKey(1);
        System.out.println(user.toString());
        return "success:"+user;
    }

}
